What’s covered in this lecture?

1 Introductory Web Scraping

The URL: http://brandirectory.com/league_tables/table/global-500-2018

1.2 Data Preprocessing

##      Rank17          Rank16                                  Company   
##  Min.   :  1.0   Min.   :  1.0    CVS Health                     :  1  
##  1st Qu.:125.8   1st Qu.:115.5    Sumitomo Mitsui Financial Group:  1  
##  Median :250.5   Median :231.0   20th Century Fox                :  1  
##  Mean   :250.5   Mean   :234.0   3 Mobile                        :  1  
##  3rd Qu.:375.2   3rd Qu.:346.5   3M                              :  1  
##  Max.   :500.0   Max.   :500.0   7-Eleven                        :  1  
##                  NA's   :41      (Other)                         :494  
##                                                         Logo    
##  /images/profile/logo/2000px_macys_logo_cms.jpg           :  1  
##  /images/profile/logo/2000px_morgan_stanley_logo_1_cms.jpg:  1  
##  /images/profile/logo/2000px_youtube_logo_2017_cms.jpg    :  1  
##  /images/profile/logo/20th_century_fox_logo.jpg           :  1  
##  /images/profile/logo/3_mobile_3.png                      :  1  
##  /images/profile/logo/3m.jpg                              :  1  
##  (Other)                                                  :494  
##                    Flag        Value17          Value16           Rate17     
##  /images/flags/us.png:193   Min.   : 14635   Min.   :     0   Min.   :17.00  
##  /images/flags/cn.png: 60   1st Qu.: 18537   1st Qu.: 16242   1st Qu.:21.00  
##  /images/flags/jp.png: 36   Median : 22246   Median : 21944   Median :22.00  
##  /images/flags/fr.png: 35   Mean   : 32536   Mean   : 28122   Mean   :21.92  
##  /images/flags/gb.png: 29   3rd Qu.: 37502   3rd Qu.: 32032   3rd Qu.:23.00  
##  /images/flags/de.png: 24   Max.   :150811   Max.   :109470   Max.   :24.00  
##  (Other)             :123   NA's   :400      NA's   :400      NA's   :400    
##      Rate16     
##  Min.   : 0.00  
##  1st Qu.:21.00  
##  Median :22.00  
##  Mean   :21.46  
##  3rd Qu.:23.00  
##  Max.   :24.00  
##  NA's   :400
##      Rank17          Rank16        Company              Logo               Flag          
##  Min.   :  1.0   Min.   :  1.0   Length:500         Length:500         Length:500        
##  1st Qu.:125.8   1st Qu.:115.5   Class :character   Class :character   Class :character  
##  Median :250.5   Median :231.0   Mode  :character   Mode  :character   Mode  :character  
##  Mean   :250.5   Mean   :234.0                                                           
##  3rd Qu.:375.2   3rd Qu.:346.5                                                           
##  Max.   :500.0   Max.   :500.0                                                           
##                  NA's   :41                                                              
##     Value17          Value16           Rate17          Rate16     
##  Min.   : 14635   Min.   :     0   Min.   :17.00   Min.   : 0.00  
##  1st Qu.: 18537   1st Qu.: 16242   1st Qu.:21.00   1st Qu.:21.00  
##  Median : 22246   Median : 21944   Median :22.00   Median :22.00  
##  Mean   : 32536   Mean   : 28122   Mean   :21.92   Mean   :21.46  
##  3rd Qu.: 37502   3rd Qu.: 32032   3rd Qu.:23.00   3rd Qu.:23.00  
##  Max.   :150811   Max.   :109470   Max.   :24.00   Max.   :24.00  
##  NA's   :400      NA's   :400      NA's   :400     NA's   :400

2 Top Brand Data Visualization

2.1 Data Preprocessing

Step 1: Start with data loading and preprocessing. For simplicity, we omit missing values.

##       Year           Rank        RankLastyear                Company        Value       
##  Min.   :2009   Min.   :  1.0   Min.   :  1.00   Allianz         :  9   Min.   :  3955  
##  1st Qu.:2011   1st Qu.: 25.0   1st Qu.: 25.00   Amazon.com      :  9   1st Qu.: 12475  
##  Median :2013   Median : 49.5   Median : 50.00   American Express:  9   Median : 16607  
##  Mean   :2013   Mean   : 49.9   Mean   : 55.51   Apple           :  9   Mean   : 20498  
##  3rd Qu.:2015   3rd Qu.: 75.0   3rd Qu.: 77.75   AT&T            :  9   3rd Qu.: 23007  
##  Max.   :2017   Max.   :100.0   Max.   :391.00   Bank of America :  9   Max.   :145918  
##                                                  (Other)         :824                   
##       Rate          Country                   Sector   
##  Min.   : 0.00   us     :403   Banks             :159  
##  1st Qu.:20.00   jp     : 90   Technology        :150  
##  Median :21.00   cn     : 78   Telecommunications:105  
##  Mean   :20.98   de     : 73   Retail            : 90  
##  3rd Qu.:22.00   gb     : 54   Auto Manufacturers: 70  
##  Max.   :24.00   fr     : 51   Oil&Gas           : 54  
##                  (Other):129   (Other)           :250

2.4 Let It Be Interactive

Step 4: You are right, we are talking about Plotly …